import { createRouter, createWebHistory } from 'vue-router'
import Layout from '../layout/index.vue'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component: Layout,
      redirect: '/dashboard',
      children: [
        {
          path: 'dashboard',
          component: () => import('@/views/dashboard/index.vue'),
          name: 'Dashboard',
          meta: { title: 'dashboard', icon: 'homepage', affix: true },
        },
        {
          path: 'dataSourceMag',
          component: () => import('@/views/dataSourceMag/index.vue'),
          name: 'dataSourceMag',
          meta: { title: 'dataSourceMag', icon: 'dataSourceMag', affix: true },
        },
        {
          path: 'profileConfig',
          component: () => import('@/views/profileConfig/index.vue'),
          name: 'profileConfig',
          meta: { title: 'profileConfig', icon: 'profileConfig', affix: true },
        },
        {
          path: 'startExperiment',
          component: () => import('@/views/startExperiment/index.vue'),
          name: 'startExperiment',
          meta: { title: 'startExperiment', icon: 'startExperiment', affix: true },
        },
        {
          path: 'formatConfig',
          component: () => import('@/views/formatConfig/index.vue'),
          name: 'formatConfig',
          meta: { title: 'formatConfig', icon: 'formatConfig', affix: true },
        },
        {
          path: 'equipmentOperationRecord',
          component: () => import('@/views/equipmentOperationRecord/index.vue'),
          name: 'equipmentOperationRecord',
          meta: {
            title: 'equipmentOperationRecord',
            icon: 'equipmentOperationRecord',
            affix: true,
          },
        },
      ],
    },
  ],
})

export default router
